package re56.misc;

public class Vector2
{
	private int X;
	private int Y;
	
	public Vector2()
	{
		setX(0);
		setY(0);
	}
	
	public Vector2(int X, int Y)
	{
		this.setX(X);
		this.setY(Y);
	}
	
	public void setX(int x)
	{
		X = x;
	}

	public int getX()
	{
		return X;
	}

	public void setY(int y)
	{
		Y = y;
	}

	public int getY()
	{
		return Y;
	}
	
	public double distance(Vector2 vect)
	{
		return Math.sqrt(Math.pow(vect.getX() - this.getX(), 2) + Math.pow(vect.getY() - this.getY(), 2));
	}
	
	public String toString()
	{
		return "("+X+","+Y+")";
	}
}
